package com.lvhx.springboot.springbatch.batch;

import org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer;

import javax.sql.DataSource;

public class ObSequenceMaxValueIncrementer extends AbstractSequenceMaxValueIncrementer {
    public ObSequenceMaxValueIncrementer(DataSource dataSource, String incrementerName) {
        super(dataSource, incrementerName);
    }

    @Override
    protected String getSequenceQuery() {
        return "select " + getIncrementerName() + ".nextval from dual";
    }

}
